package _9;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Score {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.println("输入多行考试的语文，数学，英语的高考成绩，输入EOF结束");
        List<Double> c = new ArrayList<Double>();
        List<Double> m = new ArrayList<Double>();
        List<Double> e = new ArrayList<Double>();
        while(in.hasNext()) {
            c.add(in.nextDouble());
            m.add(in.nextDouble());
            e.add(in.nextDouble());
        }
        KeyUniversity k = new KeyUniversity();
        for (int i = 0; i < c.size(); i++) {
            k.inputMarks(c.get(i), m.get(i), e.get(i));
        }
    }
}

class University{
    protected int entryScore;
    protected double Chinese;
    protected double Math;
    protected double English;
    public University(){
        entryScore = 285;
    }
    protected void inputMarks(double chinese, double math, double english){
        double sum = chinese + math + english;
        if (sum >= entryScore){
            System.out.println("考分" + sum + "达二本线");
        }else{
            System.out.println("考分" + sum + "未达二本线");
        }
    }
}

class KeyUniversity extends University{
    protected int entryScore;
    private double Discount;
    public KeyUniversity(){
        entryScore = 336;
    }

    @Override
    protected void inputMarks(double chinese, double math, double english) {
        double sum = chinese + math + english;
        if (sum >= entryScore){
            System.out.println("考分" + sum + "达一本线");
        }else {
            super.inputMarks(chinese, math, english);
        }
    }
}